public class Ruta
{
	public String localitatePlecare;
	public String localitateSosire;
	public int distanta;
	public boolean skip;
 	public boolean fluvial;
	public boolean rutier;
	public boolean feroviar;
	public String getLocalitatePlecare() {
		return localitatePlecare;
	}
	public void setLocalitatePlecare(String localitatePlecare) {
		this.localitatePlecare = localitatePlecare;
	}
	public String getLocalitateSosire() {
		return localitateSosire;
	}
	public void setLocalitateSosire(String localitateSosire) {
		this.localitateSosire = localitateSosire;
	}
	public int getDistanta() {
		return distanta;
	}
	public void setDistanta(int distanta) {
		this.distanta = distanta;
	}
	public boolean isSkip()	{
		return this.skip;
	}
	public void setSkip(boolean skip) {
		this.skip = skip;
	}
	public Ruta(String localitateStart,String localitateEnd,
			int dist,boolean rutier,boolean feroviar,
			boolean fluvial ){
		this.localitatePlecare=localitateStart;
		this.localitateSosire=localitateEnd;
		this.distanta=dist;
		this.rutier=rutier;
		this.feroviar=feroviar;
		this.fluvial=fluvial;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + distanta;
		result = prime * result + (feroviar ? 1231 : 1237);
		result = prime * result + (fluvial ? 1231 : 1237);
		result = prime
				* result
				+ ((localitatePlecare == null) ? 0 : localitatePlecare
						.hashCode());
		result = prime
				* result
				+ ((localitateSosire == null) ? 0 : localitateSosire.hashCode());
		result = prime * result + (rutier ? 1231 : 1237);
		result = prime * result + (skip ? 1231 : 1237);
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Ruta other = (Ruta) obj;
		if (distanta != other.distanta)
			return false;
		if (feroviar != other.feroviar)
			return false;
		if (fluvial != other.fluvial)
			return false;
		if (localitatePlecare == null) {
			if (other.localitatePlecare != null)
				return false;
		} else if (!localitatePlecare.equals(other.localitatePlecare))
			return false;
		if (localitateSosire == null) {
			if (other.localitateSosire != null)
				return false;
		} else if (!localitateSosire.equals(other.localitateSosire))
			return false;
		if (rutier != other.rutier)
			return false;
		if (skip != other.skip)
			return false;
		return true;
	}
	public boolean isFluvial(){
		return this.fluvial;
	}
	public boolean isRutier(){
		return this.rutier;
	}
	public boolean isFeroviar(){
		return this.feroviar;
	}
	
}
